package cn.springcloud.fix.common.core.enums;

import lombok.Getter;

@Getter
public enum ResponseEnum {

    SUCCESS(0, "请求成功"),
    ERROR(-1, "请求失败"),
    NOT_LOGIN(-2, "未登录"),
    SESSION_EXPIRE(-3, "用户会话已过期，请重新登陆！"),
    ARGUMENT_NOT_VALID(-98, "请求参数校验不通过"),
    SYSTEM_BUSY(500100, "系统繁忙,请稍候再试"),
    SYSTEM_ERROR_ARG(500101, "传入参数错误"),
    SYSTEM_NO_PERMISSION(500102, "无权限"),
    GATEWAY_NOT_FOUND_SERVICE(500200, "服务未找到"),
    GATEWAY_ERROR(500201, "网关异常"),
    GATEWAY_CONNECT_TIME_OUT(500203, "网关超时"),
    UPLOAD_FILE_SIZE_LIMIT(500300, "上传文件大小超过限制"),

    INTERNAL_SERVER_ERROR(10000, "系统错误"),
    ILLEGAL_ARGUMENT(10001, "参数错误"),
    SERVICE_EXCEPTION(10002, "业务错误"),
    ILLEGAL_DATA(10003, "数据错误"),
    MULTIPART_TOO_LARGE(1004, "文件太大"),
    ILLEGAL_STATE(10005, "非法状态"),
    MISSING_ARGUMENT(10006, "缺少参数"),
    ILLEGAL_ACCESS(10007, "非法访问,没有认证"),
    UNAUTHORIZED(10008, "权限不足"),
    METHOD_NOT_ALLOWED(10009, "不支持的方法"),
    ILLEGAL_ARGUMENT_TYPE(10010, "参数类型错误");

    /**
     * 错误类型码
     */
    private int code;

    /**
     * 错误类型描述信息
     */
    private String message;

    ResponseEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
